package org.ourgrid.aspectos;

import org.ourgrid.gridMonitor.GridMonitorSpy;
import org.ourgrid.gridMonitor.TipoMonitorado;
import org.ourgrid.gridMonitor.operations.BrokerLocalOperation;

public aspect Broker {
	pointcut startBroker() : call(* waitForBroker*(..));
	before() : startBroker() {
		System.out.println("StartBrokerAction.actionPerformed");
		System.out.println("Implementacao do aspecto");
		GridMonitorSpy gms = new GridMonitorSpy(TipoMonitorado.BROKER, 9000);
		gms.start();
	}
	after() :startBroker() {
		BrokerLocalOperation.saveBrokerInformation();
	}
}
